package com.totoro.spring.spring_demo.property;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * Created by Niki on 2018/6/14 19:45
 */
@Component
@PropertySource(value = "classpath:config/config.properties", ignoreResourceNotFound = true)
@ConfigurationProperties(prefix = "jdbc", ignoreInvalidFields = true , ignoreUnknownFields = true)
@Data
public class PropertiesSourceDemo {
    String url;
    String user;
    String password;
}
